* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置整体页面高度 */
html,
body {
    height: 100%;
    background-image: linear-gradient(to top, #fff1eb 0%, #ace0f9 100%);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* 上方导航栏 */
.nav {
    width: 100%;
    height: 50px;
    background-color: rgba(251, 251, 251, 0.0);
    color: black;

    display: flex;
    justify-content: left;
    align-items: center;
}

/* 导航栏中的图标 */
.nav img {
    width: 40px;
    height: 40px;
    margin-left: 30px;
    margin-right: 10px;
    border-radius: 50%;
}

/* 导航栏中的占位器 */
.nav .spacer {
    width: 70%;
}

/* 导航栏中的按钮 */
.nav a {
    color:black;
    text-decoration: none;
    padding: 0 10px;
}


.search {
    margin-right: 10px;
    display: flex;
    align-items: stretch; /* 让内部元素在垂直方向上拉伸以匹配高度 */
}

.search-input {
    border-radius: 20px 0 0 20px;
    padding: 10px;
    border: 1px solid #ccc;
    flex: 1;
    transition: border-color 0.3s; /* 添加过渡效果，让颜色变化更平滑 */
    width: 300px;
}

.search-input:focus {
    border-color: rgb(252,85,49); /* 输入框获得焦点时边框颜色变为红色 */
    outline: none; /* 去除默认的聚焦外边框 */
}
.search-button {
    border-radius: 0 20px 20px 0;
    padding: 10px 20px;
    background-color: rgb(252,85,49);
    color: white;
    border: none;
    cursor: pointer;
    background-image: url(../img/search.png); /* 添加搜索图标 */
    background-repeat: no-repeat; /* 防止图标重复显示 */
    background-size: 20px; /* 调整图标大小 */
    background-position: 10px center; /* 调整图标位置 */
    padding-left: 40px; /* 考虑到图标宽度的偏移 */
}

.search-button:active {
    color: black;
    background-color: gray;
}

/* 页面内容容器, 版心 */
.container {
    /* 使用 calc 计算高度 */
    height: calc(100% - 50px);
    /* 设置版心宽度 */
    width: 1000px;
    /* 水平居中 */
    margin: 0 auto;
    /* 使用弹性布局 */
    display: flex;
    justify-content: space-between;
    align-items: center;
}



/* 右侧部分, 用来放置正文 */
.container-right {
    height: 100%;
    /* 和左侧部分中间留出 5px 间隙 */
    width: 795px;
    /* 如果内容溢出就自动加上滚动条 */
    overflow: auto;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
}

/* 隐藏滚动条 */
::-webkit-scrollbar {
    display: none;
}


.container-left {
    height: 100%;
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 5px;
}

.card {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    display: flex;
    /* 使用 Flex 布局 */
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card img {
    width: 120px;
    /* 调整头像尺寸 */
    height: 120px;
    border-radius: 50%;
    margin-bottom: 10px;
    /* 增加下方边距 */
}

.card h3 {
    padding: 5px;
    font-size: 16px;
    /* 调整标题字体大小 */
}

.card a {
    display: block;
    color: #007bff;
    /* 修改链接颜色 */
    text-decoration: none;
    padding: 5px;
    font-size: 14px;
    /* 调整链接字体大小 */
}

.icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    background-size: contain;
    background-repeat: no-repeat;
  }
  
  .icon-counter,
  .icon-reading,
  .icon-comment {
    display: flex;
    align-items: center;
  }
  
  .icon-counter {
    background-image: url(../img/writing.png);
  }
  
  .icon-reading {
    background-image: url(../img/reading.png);
  }
  
  .icon-comment {
    background-image: url(../img/comment.png);
  }
  
  .counter,
  .reading-times,
  .comment-times {
    margin-top: 10px;
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
  }
  
  .counter .icon,
  .reading-times .icon,
  .comment-times .icon {
    margin-right: 5px;
  }
  
  .counter span,
  .reading-times span,
  .comment-times span {
    text-align: left;
    display: inline-block; /* 让文字和图标并排显示 */
    vertical-align: middle; /* 垂直居中对齐 */
  }


/* 右侧部分, 用来放置正文 */
.container-right {
    height: 100%;
    width: 795px;
    overflow: auto;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 15px; /* Add some padding to the container */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Add a slight shadow */
}

/* Style for relation-tab */
.relation-tab {
    display: flex;
    align-items: center; /* 垂直居中按钮 */
    padding: 10px 0;
    border-bottom: 1px solid #ccc;
    margin-bottom: 15px;
}

/* Style for tab buttons */
.following-tab,
.follows-tab {
    padding: 8px 16px;
    cursor: pointer;
    background-color: rgb(20, 210, 20);
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: background-color 0.3s;
    margin-right: 10px; /* 添加按钮之间的右边距 */
}

.following-tab.active,
.follows-tab.active {
    background-color: #f5f5f5; /* 根据需要的颜色进行调整 */
    color: black; /* 按钮文字颜色 */
}

/* .following-tab:hover,
.follows-tab:hover {
    background-color: #e0e0e0;
} */


/* 关注/粉丝列表样式 */
.relation-list {
    display: block;
    margin-top: 15px;
}

/* 单个关注/粉丝样式 */
.relation {
    background-color: #fff;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    position: relative; /* 添加相对定位 */
}

.relation img.avtar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.relation h3.username {
    font-size: 16px;
    margin: 0;
    flex: 1;
}

.attention-button {
    width: 80px;
    padding: 5px 10px;
    background-color: rgb(200, 200, 200);
    color: black;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px; /* 添加间距以与更多选项分开 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 更多选项样式 */
.more-options {
    position: relative;
}

.options-icon {
    cursor: pointer;
    font-size: 18px;
    position: relative; /* 让选项内容相对定位，以便不会因为子元素hover而消失 */
}

.options-content {
    position: absolute;
    right: 0;
    height: 35px;
    width: 50px; /* 调整宽度 */
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 5px;
    display: none;
    white-space: nowrap; /* 防止换行截断 */
}

.options-content a {
    display: block;
    padding: 5px 0;
    text-align: center; /* 居中显示文本 */
    margin-top: -5px; /* 向上移动5px，可以根据需要进行调整 */
}

.more-options:hover .options-content {
    display: block;
}
